﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.ServiceModel;
using PR.WebService.RamanSyrtsou;
using System.Collections.Generic;
using PR.BusinessEntity.RamanSyrtsou;

namespace PR.UI.Web.RamanSyrtsou
{
    public class WebServiceClientRamanSyrtsou : ClientBase<IPRWebServiceContractRamanSyrtsou>, IPRWebServiceContractRamanSyrtsou
    {
        public WebServiceClientRamanSyrtsou() : 
            base(new NetTcpBinding(), new EndpointAddress("net.tcp://localhost:8228/PRWORKPLACE"))
        {
        }

        public List<PRObjectRamanSyrtsou> GetAllPRObjects()
        {
            return Channel.GetAllPRObjects();
        }

        public void DeletePRObject(int id)
        {
            Channel.DeletePRObject(id);
        }

        public int InsertPRObject(PRObjectRamanSyrtsou obj)
        {
            return Channel.InsertPRObject(obj);
        }

        public List<KeyValuePair<int, string>> GetAllSupportedTypes()
        {
            return Channel.GetAllSupportedTypes();
        }

        public List<KeyValuePair<int, string>> GetAllSupportedCategories()
        {
            return Channel.GetAllSupportedCategories();
        }

        public PRObjectRamanSyrtsou GetObjectById(int id)
        {
            return Channel.GetObjectById(id);
        }

        public void UpdatePRObject(PRObjectRamanSyrtsou obj)
        {
            Channel.UpdatePRObject(obj);
        }

        public PRObjectDescriptionRamanSyrtsou GetDescriptionById(int id)
        {
            return Channel.GetDescriptionById(id);
        }

        public PRObjectDescriptionRamanSyrtsou InsertDescription(PRObjectDescriptionRamanSyrtsou description)
        {
            return Channel.InsertDescription(description);
        }

        public void UpdateDescription(PRObjectDescriptionRamanSyrtsou description)
        {
            Channel.UpdateDescription(description);
        }

        public void DeleteDescriptionById(int id)
        {
            Channel.DeleteDescriptionById(id);
        }
    }
}
